package com.bw.ogin.model

import com.bw.common.model.BaseRepository
import com.bw.network.HttpInterceptorType
import com.bw.ogin.api.LoginApiServer
import com.bw.ogin.entity.LoginResultEntity
import okhttp3.RequestBody

/**
 * 登录的仓库
 */
class LoginRepository:BaseRepository<LoginApiServer>() {
    //账户登录
    suspend fun loginToServer(body:RequestBody):LoginResultEntity = createApiServer(LoginApiServer::class.java,HttpInterceptorType.SIGN).loginToServer(body)

    //账户注册
    suspend fun registerToServer(body: RequestBody):LoginResultEntity = createApiServer(LoginApiServer::class.java,HttpInterceptorType.SIGN).registerToServer(body)
}